From: Ævar Arnfjörð Bjarmason Date: Tue, 29 Nov 2005 09:55:50 +0000 (+0000) Subject: * Removed Parser::doExponent(), unused X-Git-Tag: 1.6.0~1097 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=1ebdddf4a2f3a14dd4956944a3868a9ed82b5135;p=lhc%2Fweb%2Fwiklou.git * Removed Parser::doExponent(), unused * substr( '======', 0, $i ) => str_repeat( '=', $i ), clearer and slightly faster --- diff --git a/includes/Parser.php b/includes/Parser.php index f40d3ea0ce..8747b09bfe 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -831,19 +831,6 @@ class Parser return $text; } - /** - * Parse ^^ tokens and return html - * - * @access private - */ - function doExponent( $text ) { - $fname = 'Parser::doExponent'; - wfProfileIn( $fname ); - $text = preg_replace('/\^\^(.*?)\^\^/','\\1', $text); - wfProfileOut( $fname ); - return $text; - } - /** * Parse headers and return html * @@ -853,7 +840,7 @@ class Parser $fname = 'Parser::doHeadings'; wfProfileIn( $fname ); for ( $i = 6; $i >= 1; --$i ) { - $h = substr( '======', 0, $i ); + $h = str_repeat( '=', $i ); $text = preg_replace( "/^{$h}(.+){$h}(\\s|$)/m", "\\1\\2", $text ); }